import { request } from '@/sheep/request';

const route = {
  path: 'application',
  name: 'seller.admin.application',
  component: () => import('./index.vue'),
  meta: {
    title: '商家申请',
  },
};

const api = {
  list: (params) =>
    request({
      url: '/operations/admin/apply',
      method: 'GET',
      params,
    }),
  audit: (id, data) =>
    request({
      url: `/operations/admin/apply/audit/${id}`,
      method: 'POST',
      data,
    }),
    // 填写资料  账号
    updateAccount: (id, data) =>
      request({
        url: `/operations/admin/apply/${id}`,
        method: 'PUT',
        data,
      }),
  detail: (id) =>
    request({
      url: `/operations/admin/apply/${id}`,
      method: 'GET',
    }),
};

export { route, api };